import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { knowledge, system, aiqa } from '@/api/apiModulesType';

// 删除全部团队模板
export function apiDeleteAllTemplate(params) {
  return request({
    url: `${knowledge}/api/teamTemplateTree/deleteAllByTeamId`,
    method: 'get',
    params
  });
}
// 更新模板信息
export function apiUpdateTemplate(data) {
  return request({
    url: `${knowledge}/api/teamTemplateTree/updateTemplate`,
    method: 'post',
    data
  });
}

// 上传团队模板
export function apiCreateTeamTemplateTree(data) {
  return request({
    url: `${knowledge}/api/teamTemplateTree/uploadTemplate`,
    method: 'post',
    data
  });
}
// 批量上传团队模板
export function apiBatchUpload(data) {
  return request({
    url: `${knowledge}/api/teamTemplateTree/batchUpload`,
    method: 'post',
    data
  });
}
// 删除团队模板
export function apiDeleteTemplateById(params) {
  return request({
    url: `${knowledge}/api/teamTemplateTree/deleteTemplateById`,
    method: "get",
    params,
  });
}
// 团队模板
export function apiTeamTemplateTree(params) {
  return request({
    url: `${knowledge}/api/teamTemplateTree`,
    method: "get",
    params,
  });
}
// 团队使用模板
export function apiCreateFileFormTemplate(params) {
  return request({
    url: `${knowledge}/api/teamTemplateTree/createFileFormTemplate`,
    method: "get",
    params,
  });
}
//查询模版模板(内容模块)
export function apiqueryTemplate(params) {
  return request({
    url: `${knowledge}/api/enterpriseTemplateTree/queryTemplate`,
    method: "get",
    params,
  });
}
// 查询自定义表单模板
export function apiQueryTemplateOrForm(params) {
	return request({
		url: `${knowledge}/api/formData/queryTemplateOrForm`,
		method: 'get',
		params
	})
}